package com.zttek.videoShareProject.modules.service;
import com.zttek.videoShareProject.common.json.CommentVO;
import com.zttek.videoShareProject.common.json.Result;
import com.zttek.videoShareProject.modules.model.Comment;
import com.baomidou.mybatisplus.service.IService;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author CBY
 * @since 2018-07-03
 */
public interface ICommentService extends IService<Comment> {


    /**
     * 对context进行关键字处理后，保存至数据库,返回commentId。
     * @param comment
     * @return
     * @throws Exception
     */
    public CommentVO.CommentForAddReturn addComment(Comment comment) throws Exception;

    /**
     * 通过video_id,一次返回该视频的所有评论数据
     * @param video_id
     * @return
     * @throws Exception
     */
    public List<CommentVO.CommentForAddReturn> selectCommentByVideoId (@RequestParam(value = "video_id")Long video_id)throws Exception;
}
